﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="EditSelectedVideo.aspx.vb" Inherits="_3dBuzz.EditSelectedVideo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        You may edit the Title and Description of the selected video:</p>
    <p>
        &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="VideoId" DataSourceID="SqlDataSource1">
            <Columns>
              
                <asp:BoundField DataField="OriginalFilename" HeaderText="Filename" 
                    SortExpression="OriginalFilename" />
                <asp:TemplateField HeaderText="Video">
                       <ItemTemplate>
                            
                            <video  width="320" height="240" controls="controls" preload="metadata">
                            <source src= "<%# Eval("Showreel") %>" type ='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'  />
                            <source src= "<%# Eval("Showreel") %>" type = 'video/ogg; codecs="theora, vorbis"'  />
                                 Your browser does not support the video tag.
                            </video>
                       </ItemTemplate>
                   </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:3dBuzzDatabase %>" 
            ProviderName="<%$ ConnectionStrings:3dBuzzDatabase.ProviderName %>" 
            SelectCommand="SELECT * FROM [Video] WHERE ([VideoId] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="VideoId" QueryStringField="VideoId" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:Label ID="Label1" runat="server" Text="Title:" Width="100px"></asp:Label>
        <asp:TextBox ID="tb_Title" runat="server"></asp:TextBox>
    </p>
    <p>
        <asp:Label ID="Label2" runat="server" Text="Description:" Width="100px"></asp:Label>
        <asp:TextBox ID="tb_Description" runat="server" TextMode="MultiLine" 
            Height="102px" Width="416px"></asp:TextBox>
    </p>
    <p>
        <asp:Label ID="Label4" runat="server" Text=" " Width="100px"></asp:Label>
        <asp:Button ID="btn_Submit" runat="server" Text="Submit" />
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
